from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier

li = load_iris()

x_train, x_test, y_train, y_test = train_test_split(li.data, li.target, test_size=0.25)

knn = KNeighborsClassifier()

knn.fit(x_train, y_train)

acc = knn.score(x_test, y_test)

print(acc)
